import {http} from '../request/index.js';
//文章列表
export const articleList = (params) => {
	return http.get('/api/article/list',params);
}
//文章详情
export const articleDetail = (params) => {
	return http.get('/api/article/detail',params);
}
//文章分类列表
export const articleCategory = (params) => {
	return http.get('/api/article/category',params);
}
//某分类下的文章
export const articleForCategory = (params) => {
	return http.get('/api/article/for_category',params);
}
//商品列表
export const goodsList = (params) => {
	return http.get('/api/goods/list',params);
}
//商品详情
export const goodsDetail = (params) => {
	return http.get('/api/goods/detail',params);
}
//商品分类列表
export const goodsCategory = (params) => {
	return http.get('/api/goods/category',params);
}
//某分类下的商品
export const goodsForCategory = (params) => {
	return http.get('/api/goods/for_category',params);
}
//购物车数据列表
export const cartList = (params) => {
	return http.get('/api/cart/list',params);
}
//购物车添加
export const cartAdd = (params) => {
	return http.post('/api/cart/add',params);
}
//购物车改变
export const cartChange = (params) => {
	return http.post('/api/cart/change',params);
}
//购物车删除
export const cartDelete = (params) => {
	return http.post('/api/cart/delete',params);
}
//清空购物车
export const cartClear = (params) => {
	return http.get('/api/cart/clear',params);
}
//购物车详情
export const cartDetail = (params) => {
	return http.post('/api/cart/detail',params);
}
//商品收藏添加
export const goodscollectAdd = (params) => {
	return http.post('/api/user.goodscollect/add',params);
}
//商品收藏删除
export const goodscollectDelete = (params) => {
	return http.post('/api/user.goodscollect/delete',params);
}
//商品收藏添加和取消
export const goodscollectSwitch = (params) => {
	return http.post('/api/user.goodscollect/switch',params)
}
//优惠券列表
export const couponList = (params) => {
	return http.get('/api/user.coupon/list',params);
}
//优惠券详情
export const couponDetail = (params) => {
	return http.get('/api/user.coupon/detail',params);
}
//领券中心接口
export const coupon= (params) => {
	return http.get('/api/coupon/list',params);
}
//领取优惠券
export const couponReceive= (params) => {
	return http.post('/api/user.coupon/receive',params);
}
// export const cartDetail = (params) => {
// 	return http.get('/api/cart/detail',params);
// }

//搜索关键词记录
export const hot_search_log = (params) => {
	return http.get('/api/index/hot_search_log',params);
}

//首页搜索(商品)列表
export const searchList = (params) => {
	return http.get('/api/index/search',params);
}
